home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Software Vault: The Gold Collection
/
Software Vault - The Gold Collection (American Databankers) (1993).ISO
/
cdr11
/
powerb5.zip
/
P5DBS002.TIP
< prev
next >
Wrap
Text File
|
1993-06-01
|
3KB
|
60 lines
It's easy to obtain summary information such as column
totals without creating a query in Paradox 3.x. For example,
the IMAGECSUM() function displays the total of any numeric
column. To use this function, place the cursor on a column
that you want to total and press <Alt>-<F10>. Select Value
in the resulting menu, type IMAGECSUM(), and press <Enter>.
The result is displayed in the message window at the bottom
right of the screen. You can use other functions to display
minimums, maximums, averages, and counts.
This method has several advantages over querying. It's
faster, because you don't need to create a query form and
type in the requirements. It's also more flexible, since
IMAGE functions can be used in tables or forms, or even in
linked or unlinked multitable forms.
To make these functions even easier to use, you can assign
them to key combinations. The PAL script SETKEYS.SC assigns
summary functions to specific keys. Once you've run the
script, press <Alt>-S to get a sum of the current field's
values, <Alt>-N to get the smallest value in the field,
<Alt>-M the largest, and <Alt>-A the average. All four
commands use the FORMAT() function to display every answer
to two decimal places. Each of these functions displays an
error message if you use it on a nonnumeric column or when
there aren't any columns.
If you change the name of the script INIT.SC, the keys are
assigned automatically each time Paradox is started (if you
already have an INIT.SC file, you may prefer to add these
lines to it rather than create a new script). If you name
the script something other than INIT (I call it SETKEYS) you
can assign the keys by playing the script via the Script
Play command. See Chapter 3 of the PAL user guide for
information on the codes for assigning keys.
D. Hemachandra
Seattle, Washington
Editor's Note: SETKEYS.SC is in the P5DBS directory of your
PowerBase *.* Volume 5 diskette. You may wish to edit this
script to suit your own needs; Ruth Anne Ladue, my resident
Paradox expert, informs me that the FORMAT portion of each
script (which determines how the result is displayed) can be
changed to display data in almost any format you choose.
'W20.2,EC' means a field 20 spaces wide with two decimal
places; the 'EC' puts a comma between every three digits.
Without the FORMAT() function, a script prints numbers using
the default field width in Paradox -- a good choice if the
values in that column represent something other than dollars
and cents.
Title: Superfast Summaries in Paradox
Category: DBS
Issue Date: July, 1992
Editor: Brett Glass
Supplementary Files: P5DBS\SETKEYS.SC
Filename: P5DBS002.TIP